Skip to content

Conversation

NicolasHug
Copy link
Member

No description provided.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 31, 2025
};

std::mutex DecoderCache::mutex_;
std::vector<CachedDecoder> DecoderCache::cached_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's more clear to make mutex_ and cached_ normal member variables of DecoderCache, and then declare an instance of DecoderCache that is itself static.

}
};
static CacheCleanup g_cache_cleanup;

Copy link
Contributor

@scotts scotts Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing the above would, I think, enable you to just make this cleanup logic the destructor for DecoderCache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants